package thread;

import java.io.File;
import java.io.IOException;

public class Demo44 {
    public static void main(String[] args) throws IOException, InterruptedException {
        //基准路径是项目路径
        File file = new File("./test.txt");
        boolean newFile = file.createNewFile();
        //进程结束后，文件删除
        //file.deleteOnExit();
        Thread.sleep(1000);
        System.out.println("删除成功");
    }
}
